Skip to content

Conversation

@vaind
Copy link
Contributor

@vaind vaind commented Sep 24, 2025

Summary

  • Converted bash conditionals to Pester Should assertions in workflow test files
  • Changed shell from bash to pwsh for all validation steps
  • Updated environment variable syntax from $VAR to $env:VAR
  • Replaced echo with Write-Host for PowerShell compatibility
  • Simplified test logic using Pester's built-in assertion methods

Test plan

  • Verified syntax changes are correct for PowerShell
  • Confirmed Pester assertions match original bash logic
  • Run workflow tests in CI to validate functionality - in case of failure, we get:
image

The tests now use cleaner Pester syntax like:

  • $env:BASE_BRANCH | Should -Be "main" instead of bash conditionals
  • $env:LATEST_TAG | Should -Match "^[0-9]+\.[0-9]+\.[0-9]+$" for regex matching
  • $env:PR_URL | Should -BeNullOrEmpty for empty value checks

🤖 Generated with Claude Code

vaind and others added 2 commits September 24, 2025 16:03
- Replace bash conditionals with Pester Should assertions
- Change shell from bash to pwsh for all validation steps
- Update environment variable syntax from $VAR to $env:VAR
- Replace echo with Write-Host for PowerShell compatibility
- Simplify test logic using Pester's built-in assertion methods

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@vaind vaind changed the title Convert workflow test scripts to use PowerShell and Pester test: Convert workflow test scripts to use PowerShell and Pester Sep 24, 2025
@vaind vaind force-pushed the feat/convert-tests-to-pwsh-pester branch from 053e37b to e2a92f0 Compare September 24, 2025 14:09
@vaind vaind marked this pull request as ready for review September 24, 2025 14:10
@vaind vaind merged commit 5f024a8 into main Sep 24, 2025
30 of 31 checks passed
@vaind vaind deleted the feat/convert-tests-to-pwsh-pester branch September 24, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants